Skip to content

fix: Moved GRPC services over to use PBJ generated ones #1155

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jasperpotts
Copy link
Contributor

@jasperpotts jasperpotts commented May 16, 2025

Reviewer Notes

Stops exporting protoc to anything other than simulator and suites

Related Issue(s)

Fixes #1088

Signed-off-by: Jasper Potts <1466205+jasperpotts@users.noreply.github.com>
@jasperpotts jasperpotts marked this pull request as ready for review May 16, 2025 00:32
@jasperpotts jasperpotts requested review from a team as code owners May 16, 2025 00:32
import edu.umd.cs.findbugs.annotations.NonNull;
import java.util.Arrays;
import java.util.List;
import org.hiero.block.api.BlockAccessServiceInterface;
import org.hiero.block.api.BlockRequest;
import org.hiero.block.api.BlockResponse;
import org.hiero.block.api.BlockResponse.Code;
// PBJ doesn't generate GRPC stubs for some reason, also the proto file is broken when PBJ compiles it...
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might want to remove this comment as well.

this.openSessions = new ConcurrentSkipListMap<>();
virtualThreadExecutor = context.threadPoolManager().getVirtualThreadExecutor(null);
virtualThreadExecutor = context.threadPoolManager().getVirtualThreadExecutor("SubscribeBlockStreamHandler");
Copy link
Contributor

@jsync-swirlds jsync-swirlds May 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was null on purpose, so we don't create unique executors for every single handler.
By setting the name, you get a new executor service for each handler, and all of the created threads have the exact same thread name (which doesn't really help).

Copy link
Contributor

@jsync-swirlds jsync-swirlds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of non-blocking items.

Thanks for tackling this.

Copy link
Contributor

@AlfredoG87 AlfredoG87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, other than the comments leaved by @jsync-swirlds
Also spotless is complaining.

@AlfredoG87 AlfredoG87 added the Block Node Issues/PR related to the Block Node. label May 16, 2025
@AlfredoG87 AlfredoG87 added this to the 0.11.0 milestone May 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Block Node Issues/PR related to the Block Node.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace protoc gRPC implementations with PBJ versions
3 participants